package com.example.jzg.mvpdemo.base;
/**
 * author: gcc
 * date: 2016/12/2 17:31
 * email:
 */

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.example.jzg.mvpdemo.Utils.TUtil;

/**
 * author: guochen
 * date: 2016/12/2 17:31
 * email: 
 */
public abstract class BaseActivity<T extends BasePresenter,E extends BaseModel> extends AppCompatActivity {
    public T mPresenter;
    public E mModel;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mPresenter = TUtil.getT(this,0);
        mModel = TUtil.getT(this,1);
        if(mPresenter!=null){
            mPresenter.mContext = this;
        }

        this.initPresenter();
    }

    public abstract void initPresenter();
}
